

package ex2.simulations;
//
import ex2.src.Txc;
//
////
//// Two instances (tic and toc) of Txc connected.
////
//
simple Txc
{
    parameters:
        @display("i=block/routing");
        volatile double delay @unit(s);
        int numMessage = default(5);
        bool sendInitialMessage = default(false);
    gates:
        input in;
        output out;

}
network Tictoc
{
    @display("bgb=233,127");
    submodules:
        tic: Txc {
            parameters:
                @display("i=,cyan");
                sendInitialMessage = true;
        }
        toc: Txc {
            parameters:
                @display("i=,gold;p=51,30");
        }
    connections:
        tic.out --> {  delay = 100ms; } --> toc.in;
        toc.out --> {  delay = 100ms; } --> tic.in;

}

